package jtk.project4.fleet.field;


import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.TableField;
import nl.coderight.jazz.form.field.TextField;
import nl.coderight.jazz.form.field.TableField.AutoResizeMode;

public class WorkOrderManagementField extends GroupControl<String>{
	
	private TableField<String> workOrderManagementTable;
	

	public WorkOrderManagementField(String bindID){
		setTitle("header.workordermanagement");
		setBindID(bindID);
		createField();
		createLayout();
	
	
	}
		
		private void createField() {
		
			workOrderManagementTable = new TableField<String>("workOrderManagement","workordermanagement");
			workOrderManagementTable.setTitle("workOrderManagement.header.table");
			workOrderManagementTable.setAutoResizeMode(AutoResizeMode.OFF);
			workOrderManagementTable.getSelectionValues();
			
			workOrderManagementTable.addColumn("label.Work Order","workOrder");
			workOrderManagementTable.addColumn("label.Identification","identification");
			workOrderManagementTable.addColumn("label.Date Issued","dateIssued");
			workOrderManagementTable.addColumn("label.Status","status");
			workOrderManagementTable.addColumn("label.Date Complete","datecomplete");
			workOrderManagementTable.addColumn("label.Down Time (Days)","downTime");
			workOrderManagementTable.addColumn("label.Meter","meter");
			workOrderManagementTable.addColumn("label.Priority","priority");
			workOrderManagementTable.addColumn("label.Type","type");
			workOrderManagementTable.addColumn("label.Work Performed","workPerformed");
			workOrderManagementTable.addColumn("label.Employee","employee");
			workOrderManagementTable.addColumn("label.Vendor","vendor");
			workOrderManagementTable.addColumn("label.Invoice#","invoice");
			workOrderManagementTable.addColumn("label.PO#","po");
			workOrderManagementTable.addColumn("label.Cost Center","costCenter");
			workOrderManagementTable.addColumn("label.Maintenance Cost","maintenanceCost");
			workOrderManagementTable.addColumn("label.Repair Cost","repairCost");
			workOrderManagementTable.addColumn("label.Part Cost","partCost");
			workOrderManagementTable.addColumn("label.Labor Cost","laborCost");
			workOrderManagementTable.addColumn("label.Taxes","taxes");
			workOrderManagementTable.addColumn("label.Total Cost","totalCost");
			workOrderManagementTable.addColumn("label.Defined Cost","definedCost");
			workOrderManagementTable.addColumn("label.Discount %","discount");
			workOrderManagementTable.addColumn("label.Discount Value","discountValue");
			workOrderManagementTable.addColumn("label.Location","location");
			workOrderManagementTable.addColumn("label.Category","category");
			workOrderManagementTable.addColumn("label.UDF1#","udf1");
			workOrderManagementTable.addColumn("label.UDF2#","udf2");
		}

		
		private void createLayout(){
		setLayout(new FormLayout())
		.addField(workOrderManagementTable);
		
		}

}

